package com.parktech.sun.domain.model.industryprealert;

import com.parktech.sun.domain.model.ContentEntity;
import com.parktech.sun.domain.model.news.NewsAttachment;

import javax.persistence.*;
import java.util.List;

/**
 * User: Think
 * Date: 11-1-17
 * Time: 下午10:16
 */
@Entity
@DiscriminatorValue("20")
public class IndustryPrealert extends ContentEntity {

    private String imageName;

    private List<IndustryPrealertAttachment> attachmentList;

    private String src;

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    @OneToMany(fetch= FetchType.LAZY, mappedBy = "industryPrealert", cascade = CascadeType.ALL)
    public List<IndustryPrealertAttachment> getAttachmentList() {
        return attachmentList;
    }

    public void setAttachmentList(List<IndustryPrealertAttachment> attachmentList) {
        this.attachmentList = attachmentList;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    @Transient
    public String getLocation() {
        return "prealerts";
    }
}
